load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "httpsink",
    srcs = ["http_storage.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/cloud/httpsink",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/base",
        "//pkg/cloud",
        "//pkg/cloud/cloudpb",
        "//pkg/server/telemetry",
        "//pkg/settings/cluster",
        "//pkg/util/ioctx",
        "//pkg/util/log",
        "//pkg/util/retry",
        "//pkg/util/timeutil",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_redact//:redact",
    ],
)

go_test(
    name = "httpsink_test",
    srcs = ["http_storage_test.go"],
    embed = [":httpsink"],
    deps = [
        "//pkg/base",
        "//pkg/blobs",
        "//pkg/cloud",
        "//pkg/cloud/cloudpb",
        "//pkg/cloud/cloudtestutils",
        "//pkg/security/username",
        "//pkg/settings",
        "//pkg/settings/cluster",
        "//pkg/testutils",
        "//pkg/util/ctxgroup",
        "//pkg/util/ioctx",
        "//pkg/util/leaktest",
        "//pkg/util/retry",
        "@com_github_stretchr_testify//require",
    ],
)
